const express = require('express')

const router = express.Router()

module.exports = router

router.all('*', function (req, res, next) {
    // console.log(1);
    res.header('Access-Control-Allow-Origin', '*');
    res.header('Access-Control-Allow-Headers', 'Content-Type');
    res.header('Access-Control-Allow-Methods', '*');
    res.header('Content-Type', 'application/json;charset=utf-8');
    next();
});
router.use(
    express.urlencoded({ extended: false }),
    express.json(),
)

let listRouter = require('./movielist')
router.use('/list', listRouter)

let userRouter = require('./user')
router.use('/user', userRouter)